Skip to content

Handle paths illegal on Windows in ImageDescriptor.createFromFile() #2946

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 27, 2025

Conversation

HannesWell
Copy link
Member

Handle filenames, that are used as file-system paths because the context class is null and are illegal on Windows, for example like: /C:/data/other

This happens if retrieved from a URL/URI by just using URL/URI.getPath() instead of using Path.of(uri) or new File(uri).

Using IPath.fromOSString() instead of Path.of(), allows to use these kind of illegal paths.

This fixes the test-failure introduced in

Handle filenames, that are used as file-system paths because the context
class is null and are illegal on Windows, for example like:
/C:/data/other

This happens if retrieved from a URL/URI by just using
'URL/URI.getPath()' instead of using 'Path.of(uri)' or 'new File(uri)'.

Using IPath.fromOSString() instead of Path.of(), allows to use these
kind of illegal paths.
Copy link
Contributor

Test Results

 1 824 files  +  301   1 824 suites  +301   1h 31m 15s ⏱️ + 19m 8s
 7 918 tests ±    0   7 690 ✅ +    2  228 💤  -   1  0 ❌ ±0 
23 841 runs  +1 657  23 093 ✅ +1 463  748 💤 +195  0 ❌ ±0 

Results for commit ea82769. ± Comparison against base commit 4fa1eee.

@HannesWell HannesWell merged commit 08c79bf into eclipse-platform:master Apr 27, 2025
11 checks passed
@HannesWell HannesWell deleted the handle-illegal-paths branch April 27, 2025 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant